import 'package:flutter_test/flutter_test.dart';
import 'package:kiosk_model/kiosk_model.dart';
import 'package:kiosk_model/kiosk_model_platform_interface.dart';
import 'package:kiosk_model/kiosk_model_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockKioskModelPlatform
    with MockPlatformInterfaceMixin
    implements KioskModelPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final KioskModelPlatform initialPlatform = KioskModelPlatform.instance;

  test('$MethodChannelKioskModel is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelKioskModel>());
  });

  test('getPlatformVersion', () async {
    KioskModel kioskModelPlugin = KioskModel();
    MockKioskModelPlatform fakePlatform = MockKioskModelPlatform();
    KioskModelPlatform.instance = fakePlatform;

    expect(await kioskModelPlugin.getPlatformVersion(), '42');
  });
}
